package com.yowasa.xiuxian.engine.hone.mental;


import com.google.common.collect.Lists;
import com.yowasa.xiuxian.annoations.Mental;
import com.yowasa.xiuxian.constant.XiuxianConstants;
import com.yowasa.xiuxian.engine.hone.MentalInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.bo.user.UserBattle;
import com.yowasa.xiuxian.entity.enums.ElementEnum;
import com.yowasa.xiuxian.entity.enums.StageEnum;
import com.yowasa.xiuxian.exception.HandlerException;

import java.util.List;

@Mental(name = "七杀剑诀")
public class QiShaJianJue implements MentalInterface {


    @Override
    public ElementEnum getElement() {
        return ElementEnum.GOLD;
    }

    @Override
    public void limit(UserBO user) {
        if (user.getElement().get("金") < XiuxianConstants.DEFAULT_ELEMENT_ACTIVITY) {
            throw new HandlerException("修习七杀剑诀必须具有金灵根");
        }
        if (user.getUserAttr().getStr() < 50) {
            throw new HandlerException("修习七杀剑诀力量最低要50");
        }
    }

    @Override
    public String limitDesc() {
        return "具有金灵根且力量最低要50";
    }

    @Override
    public String desc() {
        return "金属性心法,特点是能大幅提高修习者的速度和物理攻击力,对修习者对力量和敏捷要求较高";
    }

    @Override
    public List<String> bsList() {
        return Lists.newArrayList("剑心诀","御剑术","七杀魔体");
    }

    @Override
    public List<String> specialList() {
        return Lists.newArrayList("北极剑煞");
    }

    @Override
    public String breakUp(UserBO user) {
        UserBattle upBattle = getBaseUp(user);
        upBattle.setAtk((int)((upBattle.getAtk()+5) * 1.5));
        upBattle.setSpd((int)(upBattle.getSpd() * 1.2));
        buildNewUpBattle(user, upBattle);
        return upBattle.getUpDesc();
    }


}
